#header{
   <!-- umeditor-->
    <link type="text/css" rel="stylesheet" href="/css_js/umeditor/themes/default/css/umeditor.css">

}#


#body{
 
 <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5></h5>
                </div>
                <div class="ibox-content">
                  <form method="post" action="<?php echo SplitUrl("admin/home/noteupdate") ?>"> 
                  <input name="id" value="<?php echo isset($output[0])?$output[0]:'0' ?>" hidden/>
                  <input name="data[content]" id="content" hidden=""/>
                  <input name="data[time]" value="<?php echo isset($output[0])?$output['time']:date("Y-m-d h:i:s a"); ?>"  hidden/>
                  
                        <div class="form-horizontal m-t">
                            <div class="form-group">
                                <label class="col-sm-1 control-label">标题：</label>
                                <div class="col-sm-5">                                    
                                  <input  class="form-control"  name="data[title]"  size="10" type="text" value="<?php echo isset($output[0])?$output['title']:'' ?>" />
                                    <span class="field-validation-error" veri-for="" ></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">内容：</label>
                                <div class="col-sm-11">
                                    <!--script标签之间不能有换行和空格，否则新建的时候文本框会自动添加换行和空格-->
                                    <script type="text/plain" id="Body"><?php echo isset($output['content'])?$output['content']:'' ?></script>
                                     <span class="field-validation-error" veri-for="Body" ></span>
                            </div>
                        </div>


                        <div class="form-group">
                            <div class="col-sm-2 col-sm-offset-1">
                                <button class="btn btn-primary" onclick="return submit_form()">保存</button>
                                <a href="<?php echo SplitUrl("admin/home/note") ?>" class="btn btn-sm btn-white" > 返 回 </a>
                            </div>
                        </div>
                    </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

 
}#



#footer{
         	<!-- umeditor-->
    <script type="text/javascript" src="/css_js/umeditor/umeditor.config.js?time=<?php echo date("Ymdhis") ?>"></script>
    <script type="text/javascript" src="/css_js/umeditor/umeditor.js"></script>
    <script type="text/javascript" src="/css_js/umeditor/lang/zh-cn/zh-cn.js"></script>
    <!-- jQuery Validation-->
    <script src="/css_js/jQuery Validation/jquery.validate.min.js"></script>
    <script src="/css_js/jQuery Validation/jquery.validate.unobtrusive.js"></script>

    <script type="text/javascript">
    	
    	
    	//验证输入
    	function verify(){
    		if($("input[name='data[title]']").val()==""){            
            $("[name='data[title]']").next().html('请输入标题')           	
            return false;
            }
            if($("#content").val()=="<p><br></p>"){        
            $("[veri-for='Body']").html('请输入内容')           	
            return false;
            }            
            return true;    		
    	}
    	
        function submit_form() {
            $("#content").val($("#Body").html());
            return verify();
        }
        
        
        
        window.UMEDITOR_CONFIG.imageUrl ="<?php echo SplitUrl("admin/home/noteEditup/upfile") ?>";
        var um1 = UM.getEditor('Body');
        um1.addListener('fullscreenchanged', resetbody);
        function resetbody(type, isfullscreen) {
            if (!isfullscreen) {
                // 重置编辑器内容区域高度，这个高度在切换全屏时会改变，应该是 UMEditor 自身的BUG
                $("body").css("overflow", "");
            }
        }



    </script>
         	
         	
    }#